From 03244f89b5515e8794a732fcd37131db19da2caf Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 1 Feb 1994 23:10:41 +0000 Subject: [PATCH] (font-lock-set-defaults): Handle shell mode. (shell-font-lock-keywords): New variable. --- lisp/font-lock.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index d0c042d39d3..27538a8f532 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -437,6 +437,7 @@ This can take a while for large buffers." ((eq major-mode 'perl-mode) perl-font-lock-keywords) ((eq major-mode 'tex-mode) tex-font-lock-keywords) ((eq major-mode 'texinfo-mode) texi-font-lock-keywords) + ((eq major-mode 'shell-mode) shell-font-lock-keywords) (t nil))))) (defconst lisp-font-lock-keywords-1 @@ -635,6 +636,15 @@ This does a lot more highlighting.") ) "Additional expressions to highlight in TeXinfo mode.") +(defvar shell-font-lock-keywords + (list (cons shell-prompt-pattern 'font-lock-keyword-face) + (list (concat shell-prompt-pattern "\\([^ \t]+\\)") + 1 'font-lock-function-name-face) + '("[ \t]\\([+-][^ \t\n]+\\)" 1 font-lock-comment-face) + '("^[^ \t]+:.*$" . font-lock-string-face) + '("^\\[[1-9][0-9]*\\]" . font-lock-string-face)) + "Additional expressions to highlight in TeXinfo mode.") + (provide 'font-lock) ;;; font-lock.el ends here -- 2.30.2